package com.ytf.test.eighth;

import java.util.Random;

/**
 * @author: YTF
 * @date: 2025/1/3 15:23
 * @version: 1.0
 * @description: 生成随机形状
 */
public class RandomShapeGenerator {
    private Random random = new Random(47);
    public Shape next(){
        switch (random.nextInt(3)){
            default:
            case 0: return new Circle();
            case 1: return new Square();
            case 2: return new Triangle();
        }
    }
}
